<HTML>
  <HEAD>
    <link rel="stylesheet" type="text/css" href="table.css"/>
    <TITLE>&#49828;&#52992;&#51460;&#47084;</TITLE>
    <SCRIPT>
      var xmlhttp;
      function getData(str){
        if (window.XMLHttpRequest){
          xmlhttp = new XMLHttpRequest();
        }
        else{
          xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        
        if (xmlhttp == null) return;
        
        var url = "scheduler.php?str=" + str;
        
        xmlhttp.onreadystatechange = function(){
            if(xmlhttp.readyState == 4) {
              var spdata = xmlhttp.responseText;
              var strs = "";
              if (spdata != ""){
                var n = spdata.split("+");
                strs = "<TABLE><thead><tr><th id='a1' scope='col'>&#54408;&#47785;</th><th id='fn' scope='col'>&#52509; &#51116;&#44256; &#44060;&#49688;</th></thead>";
                var c = 0, d = 0;
                for (c=0; c<n.length-1; c++){
                  var res = n[c].split("-");
                  strs += "<tr>";
                  for (d=0; d<2; d++){
                     strs += "<th scope='row'>" + res[d] + "</th>";
                  }
                  strs += "</tr>";
                }
                strs += "</TABLE>";
              }
              document.getElementById("res").innerHTML = strs;
            }
         };
        xmlhttp.open("GET", url, true);
        xmlhttp.send('');
      }
    </SCRIPT>
  </HEAD>
  <BODY>
    <INPUT TYPE="TEXT" ONKEYDOWN="javascript:getData(this.value);" ONKEYUP="javascript:getData(this.value);" 
              ONKEYPRESS="javascript:getData(this.value);">
    <div id="res"></div>
  </BODY>
</HTML>